import request from '@/utils/request'

// 查询背包列表
export function listBackpack(query) {
  return request({
    url: '/backpack/list',
    method: 'get',
    params: query
  })
}

// 查询背包详细
export function getBackpack(backpackId) {
  return request({
    url: '/backpack/' + backpackId,
    method: 'get'
  })
}

// 新增背包
export function addBackpack(data) {
  return request({
    url: '/backpack',
    method: 'post',
    data: data
  })
}

// 修改背包
export function updateBackpack(data) {
  return request({
    url: '/backpack',
    method: 'put',
    data: data
  })
}

// 删除背包
export function delBackpack(backpackId) {
  return request({
    url: '/backpack/' + backpackId,
    method: 'delete'
  })
}
